Read List Item
AutomatR.DefaultActivities.List.ReadListItem<T>
The "Read List Item" activity in AutomatR, categorized under List, enables you to fetch the value of a specific item in a list. This activity is particularly useful when you need to retrieve the value stored at a particular index within a list.
Properties
Name | Description |
---|---|
Input | |
Index Number | Specifies the index of the item you want to read from the list. It represents the position of the item in the list. Integer variables containing the index value. |
List | Specifies the list from which you want to read the item. It represents the list containing the desired data. Variables of type List\<T> containing the data. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Read List Item" activity. Useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the wait time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Result | Outputs the reference of the value of the item at the specified index in a variable of type T. This variable can be used in subsequent activities or conditions. Variables of type T to store the item value. |
How to use:
- Drag and drop the "Read List Item" activity onto the workflow.
- Configure the properties, specifying the list from which to read, the index of the item, and an optional delay based on your requirements.
- Execute the workflow to retrieve the value of the specified item from the list.
- Utilize the output variable (Result) in subsequent activities or conditions.
Example: Consider an example where the "Read List Item" activity is used to retrieve a specific value from a list of integers:
Read List Item:
List: myList
Index: 2
Result: retrievedValue
In this example, the activity reads the value at index 2 from the list named "myList" and stores it in the variable "retrievedValue" for further use in the workflow.